package com.eexcel.contributor.implementation;

/**
 * Defines the factorial
 * 
 * @author Simão Fernandes
 * @version %I%, %G%
 * @since 1.0
 */
public class Factorial {
	/**
	 * Executes the formula
	 * 
	 * @param n Operand
	 * @return Result
	 */
	public static int doIt(int n) {
		if (n == 0) {
			return 1;
		}
		return n * doIt(n - 1);
	}
}
